package br.com.buscapecas.action;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * @author Maikon Rafael da Rocha
 * @since 14/09/2010 10:06:01
 */
public class SecurityAction extends AbstractAction {

    /**
     * Atributo <code>serialVersionUID</code>
     */
    private static final long serialVersionUID = 8736786571240313552L;
    
    /**
     * 
     * @param request
     * @param response
     * @param servletContext
     * @throws ServletException
     * @throws BuscaPecasException
     * @throws Exception
     * 
     * @author Maikon Rafael da Rocha
     * @since 14/09/2010 10:07:36
     * @action
     */
    public void openLogin(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws ServletException, Exception {
    }
    
    /**
     * 
     * @param request
     * @param response
     * @param servletContext
     * @throws ServletException
     * @throws BuscaPecasException
     * @throws Exception
     * 
     * @author Maikon Rafael da Rocha
     * @since 14/09/2010 10:07:58
     * @action-ajax
     */
    public void login(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws ServletException, Exception {
    }
    
    /**
     * 
     * @param request
     * @param response
     * @param servletContext
     * @throws ServletException
     * @throws BuscaPecasException
     * @throws Exception
     * 
     * @author Maikon Rafael da Rocha
     * @since 14/09/2010 13:51:05
     * @action
     */
    public void logoff(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws ServletException, Exception {
        request.getSession().invalidate();
        servletContext.getRequestDispatcher("/").forward(request, response);
    }

}
